package com.lin.cms.domain;

import java.io.Serializable;
import java.util.Date;

public class Advertising implements Serializable {

	private static final long serialVersionUID = 1L;

	private int advertisingId;

	private int adspaceId;

	private int siteId;

	private String adName;

	private String category;

	private String adCode;

	private int adWeight;

	private long displayCount;

	private long clickCount;

	private Date startTime;

	private Date endTime;

	private String isEnabled;

	public Advertising() {
	}

	public int getAdvertisingId() {
		return advertisingId;
	}

	public void setAdvertisingId(int advertisingId) {
		this.advertisingId = advertisingId;
	}

	public int getAdspaceId() {
		return adspaceId;
	}

	public void setAdspaceId(int adspaceId) {
		this.adspaceId = adspaceId;
	}

	public int getSiteId() {
		return siteId;
	}

	public void setSiteId(int siteId) {
		this.siteId = siteId;
	}

	public String getAdName() {
		return adName;
	}

	public void setAdName(String adName) {
		this.adName = adName;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getAdCode() {
		return adCode;
	}

	public void setAdCode(String adCode) {
		this.adCode = adCode;
	}

	public int getAdWeight() {
		return adWeight;
	}

	public void setAdWeight(int adWeight) {
		this.adWeight = adWeight;
	}

	public long getDisplayCount() {
		return displayCount;
	}

	public void setDisplayCount(long displayCount) {
		this.displayCount = displayCount;
	}

	public long getClickCount() {
		return clickCount;
	}

	public void setClickCount(long clickCount) {
		this.clickCount = clickCount;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getIsEnabled() {
		return isEnabled;
	}

	public void setIsEnabled(String isEnabled) {
		this.isEnabled = isEnabled;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + advertisingId;

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Advertising other = (Advertising) obj;
		if (advertisingId != other.advertisingId)
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"advertisingId=" + "'" + advertisingId + "'" + 
			")";
	}
	
}
